<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
   <p>字符串可以直接通过数组的方式解构，获取到索引处的字符。</p>
   <script>
        let str = "闇の僕たちよ、とっととお家に帰りなさい！";
        let [a,b,c,d,...e] = str;

        console.log(a);
        console.log(b);
        console.log(c);
        console.log(d);
        console.log(e);
   </script>
</body>
</html>